/**
 * 商城Vuex-actions
 */
export default {
  saveUserName(context, username) {
    context.commit('saveUserName', username);
  },
  saveCartCount(context, count) {
    context.commit('saveCartCount', count);
  },
  iniUserInfo({ state }) {
    let username = window.sessionStorage.getItem('username');
    if (username) {
      state.username = username;
    }
  },
};
